package com.kingyea.mobilepolice.dictionary.service;

import com.kingyea.mobilepolice.dictionary.bean.Dictionary;
import com.kingyea.mobilepolice.dictionary.bean.DictionaryCondition;
import com.kingyea.mobilepolice.dictionary.bean.DictionaryVo;
import com.kingyea.mobilepolice.orgjobcategory.bean.OrgDictionaryJobCategoryCondition;
import com.kingyea.mobilepolice.orgjobcategory.bean.OrgDictionaryJobCategoryPo;

import java.util.List;

/**
 * @author hx
 * @version v1.0.0
 * @description Dictionary 接口
 * @date Created in 2018-04-12 16:42:54
 */
public interface DictionaryService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    Dictionary getById(Integer id) throws Exception;

    /**
     * 列表
     *
     * @return
     */
    List<Dictionary> search(DictionaryCondition condition) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(Integer id) throws Exception;

    /**
     * 添加
     *
     * @param dictionary
     * @return
     */
    Dictionary save(Dictionary dictionary) throws Exception;

    /**
     * 更新
     *
     * @param dictionary
     * @return
     */
    Dictionary update(Dictionary dictionary) throws Exception;

    List<DictionaryVo> searchTree(DictionaryCondition condition);

    /**
     * @Description: 更新部门和警种字典的依赖
     * @Param: [po]
     * @return: java.lang.Boolean
     * @Author: cxc
     * @Date: 2018.04.27 09:57
     */
    Boolean updateForOrg(OrgDictionaryJobCategoryPo po);

    /**
     * @Description: 根据部门查询警种
     * @Param: [condition]
     * @return: java.util.List<com.kingyea.mobilepolice.dictionary.bean.Dictionary>
     * @Author: cxc
     * @Date: 2018.04.27 09:58
     */
    List<Dictionary> searchByOrgSerialNo(OrgDictionaryJobCategoryCondition condition);


}
